
package za.ac.cput.peterjohn.DesignPatternPrincipals.creational.AbstractFactoryPattern.Factory;

import za.ac.cput.peterjohn.DesignPatternPrincipals.creational.FactoryMethodPattern.Model.Animal;
import za.ac.cput.peterjohn.DesignPatternPrincipals.creational.FactoryMethodPattern.Model.Cat;
import za.ac.cput.peterjohn.DesignPatternPrincipals.creational.FactoryMethodPattern.Model.Dog;

public class MammelFactory extends SpeciesFactory 
{
    public MammelFactory() {}

    @Override
    public Animal getAnimal(String type) 
    {
        if("dog".equals(type))
            return new Dog();
        else
            return new Cat();
    }
}